<!DOCTYPE html>
<html xmlns:th="http//www.thymeleaf.org">
<head>
    <title th:text="${postDTO.title}"></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="/css/luntan.css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
</head>
<body>
<div th:insert="~{navigation :: nav}"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h3><span th:text="${postDTO.title}"></span></h3>
            <span class="text-desc">
                作者：<span th:text="${postDTO.user.name}"></span> |
                <span th:text="${postDTO.viewCount}"></span>次观看，
                <span th:text="${postDTO.likeCount}"></span>个点赞，
                <span th:text="${postDTO.commentCount}"></span>个评论，
                发帖时间：<span th:text="${#dates.format(postDTO.gmtCreate, 'dd MMMM yyyy HH:mm:ss')}"></span>
            </span>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" th:text="${postDTO.discription}"></div>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <span class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <a th:href="@{/publish(id=${postDTO.id})}" th:if="${session.user != null && session.user.id == postDTO.user.id}">
                    <span class="glyphicon glyphicon-pencil text-desc">编辑</span>
                </a>
                <a th:href="@{/drop(id=${postDTO.id})}" th:if="${session.user != null && session.user.id == postDTO.user.id}">
                    <span class="glyphicon glyphicon-remove-sign text-desc">删除</span>
                </a>
            </span>
        </div>
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>发起人</h4>
                <div class="media">
                    <div class="media-left">
                        <a href="#">
                            <img class="media-object img-circle" th:src="${postDTO.user.avatarUrl}">
                        </a>
                    </div>
                    <div class="media-body">
                        <a href="#">
                            <h5 class="media-heading" th:text="${postDTO.user.name}"></h5>
                        </a>
                        <span class="text-desc" th:text="${postDTO.user.bio}"></span>
                    </div>
                    <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>相关帖</h4>
            </div>
        </div>
    </div>
</div>
</body>
</html>